package com.example.tupu.repository;

import com.example.tupu.entity.NODE;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.neo4j.repository.query.Query;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface NodeRepository extends Neo4jRepository<NODE,Long> {


    List<NODE> findAllByTitle(String title);

    @Query("MATCH (n:NODE{title:$title}) RETURN n")
    NODE getNode(String title);
}
